package h_factory.c_method;

/**
 * Created by wug on 2016/7/6 0006.
 */
public class SkinFactory {

    public Skin makeSkin(SkinFactoryEnum enumer) {
        if (enumer.equals(SkinFactoryEnum.GOLDDEMARICA)) {
            return new SkinGoldDEMarcia();
        } else if (enumer.equals(SkinFactoryEnum.GOLD_SAINTS_DEMARICA)) {
            return new SkinGoldSaintsDEMarcia();
        } else if (enumer.equals(SkinFactoryEnum.PINK_NURSE)) {
            return new SkinPinkNurse();
        }
        return null;
    }

    public enum SkinFactoryEnum {
        GOLDDEMARICA("金色得玛西亚"),
        GOLD_SAINTS_DEMARICA("黄金圣斗士得玛西亚描述"),
        PINK_NURSE("粉色倩护士");
        private final String desc;

        SkinFactoryEnum(String desc) {
            this.desc = desc;
        }

        public String getDesc() {
            return desc;
        }
    }
}
